<SCRIPT LANGUAGE="JavaScript">  
    function swap(temp)
    {
        document.getElementById('article').style.display = 'none';
        document.getElementById('article').innerHTML = document.getElementById('article'+temp).innerHTML;
        $("#article").slideDown("slow");
    }
</SCRIPT> 

<?php


$style = ' display : none; height : 380px; overflow:auto';

$style3 = 'border-top: 2px solid #ddd;';
$style3 .= 'border-left: 2px solid #ddd;';
$style3 .= 'border-right: 3px solid #aaa;';
$style3 .= 'border-bottom: 3px solid #aaa;';
$style3 .= ' padding : 10px;';
$style3 .= ' margin : 10px 0 10px 10px;';
$style3 .= ' width : 635px;';
$style3 .= ' height : 400px;';

$style2 = 'font-size:120%;color:blue;';

e($javascript->link('jquery.js'));    
echo "<div class='form'>";    
    echo "<h2> Career Tips </h2>";
    echo "<hr color='#2A7EF7'>";
    if(count(@$data))
    {
        $i = 1;
        echo "<table>";
        echo "<tr valign='top'><td>";
        echo "<table cellpadding=0 cellspacing=0>";
            echo "<tr><th width=30px>&nbsp</th><th width='380px'>&nbsp</th><th width='100px'>&nbsp</th></tr>";
            foreach($data as $article)
            {
                echo "<tr valign='top'>";
                echo "<td align='center'>:.</td>";
                echo "<td><b>".$article['Article']['title']."</b></td>";      
                echo "<td align='right'><a href='Javascript:swap(".$i.")'>[ Show ]</a>&nbsp</td>";  
                echo "</tr>";            

                echo "<div id='article".$i."' style='display:none'>";
                echo "<b style='$style2'>".$article['Article']['title']."</b>";
                echo "<br>";
                echo $article['Article']['desc'];      
                echo "</div>";            

                $i++;
            }    
        echo "</table>";
        echo "</td><td>";  
        echo "<div style='$style3'>"; 
            echo "<div style='$style' id='article' align='justify'></div>"; 
        echo "</div>";
        echo "</td></tr>";
        echo "</table>";
    }
echo "</div>"; 
?>    